<?php

namespace app\common\model;

use think\Model;

class Adminlog extends Model
{
    protected $table='adminlog';

    /**
     * 关联获取数据
     * @param $where
     * @return mixed
     */
    public function getAllData($where){
        $data =db($this->table)
            ->alias('l')
            ->join('admin a','a.admin_id=l.admin_id')
            ->field('a.username,l.*')
            ->where($where)
            ->order('l.log_time desc')
            ->paginate(15);
        return $data;
    }
}
